package com.jf.identity.entity;

import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 考生身份验证信息
 *
 * @author FCG
 */
public class VerifyInfo implements Serializable {
    private static final long serialVersionUID = 3074065734472677063L;
    /**
     * mongoDb _id
     */
    private String _id;
    /**
     * PK
     */
    private String uid;
    /**
     * (必需)身份证件类型码
     */
    @NotBlank(message = "身份证件类型码不能为空")
    private String SFZJLXM;
    /**
     * (必需)身份证件号
     */
    @NotBlank(message = "身份证件号不能为空")
    @Size(max = 18, message = "身份证件号长度不能超过18")
    private String SFZJH;
    /**
     * (必需)考试号/考号
     */
    @NotBlank(message = "考试号/考号不能为空")
    @Size(max = 18, message = "考试号/考号长度不能超过18")
    private String KSH;
    /**
     * (必需)验证时间 yyyy-MM-dd HH:mm:ss
     */
    @NotNull(message = "验证时间不能为空")
    private Date YZSJ;
    /**
     * (必需)验证方式码
     */
//    @NotBlank(message = "验证方式码不能为空")
    private String YZFSDM;
    /**
     * (必需)验证结果 1:通过  0：存疑  -1：不通过
     */
    @NotBlank(message = "验证结果不能为空")
    @Range(min = -1, max = 1, message = "验证结果 1:通过  0：存疑  -1：不通过")
    private String YZJG;
    /**
     * 逻辑考场号
     */
    @NotBlank(message = "逻辑考场号 不能为空")
    private String LJKCH;
    /**
     * (必需)验证轨迹
     */
    @Valid
    @NotEmpty(message = "验证轨迹不能为空")
    private List<VerifyTrace> YZGJ;
    /**
     * 验证设备编号
     */
    @NotBlank(message = "验证设备编号 不能为空")
    @Size(max = 20, message = "设备编号不能超过20字符")
    private String YZSB;
    /**
     * 厂商代码
     */
    @NotBlank(message = "厂商代码 不能为空")
    private String SBCSDM;
    /**
     * 缺考标记  Y:缺考
     */
    @NotBlank(message = "缺考标记 不能为空")
    @Pattern(regexp = "(Y)|(N)",message = "缺考标记  Y:缺考 N:未缺考")
    private String QKBJ;
    /**
     * 上报时间
     */
    private Date dateTime;

    /**
     * 考试基础信息
     */
    private ExamBaseParam examBaseParam;

    private Date timestamp;

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getSFZJLXM() {
        return SFZJLXM;
    }

    public void setSFZJLXM(String SFZJLXM) {
        this.SFZJLXM = SFZJLXM;
    }

    public String getSFZJH() {
        return SFZJH;
    }

    public void setSFZJH(String SFZJH) {
        this.SFZJH = SFZJH;
    }

    public String getKSH() {
        return KSH;
    }

    public void setKSH(String KSH) {
        this.KSH = KSH;
    }

    public Date getYZSJ() {
        return YZSJ;
    }

    public void setYZSJ(Date YZSJ) {
        this.YZSJ = YZSJ;
    }

    public String getYZFSDM() {
        return YZFSDM;
    }

    public void setYZFSDM(String YZFSDM) {
        this.YZFSDM = YZFSDM;
    }

    public String getYZJG() {
        return YZJG;
    }

    public void setYZJG(String YZJG) {
        this.YZJG = YZJG;
    }

    public List<VerifyTrace> getYZGJ() {
        return YZGJ;
    }

    public void setYZGJ(List<VerifyTrace> YZGJ) {
        this.YZGJ = YZGJ;
    }

    public String getYZSB() {
        return YZSB;
    }

    public void setYZSB(String YZSB) {
        this.YZSB = YZSB;
    }

    public String getSBCSDM() {
        return SBCSDM;
    }

    public void setSBCSDM(String SBCSDM) {
        this.SBCSDM = SBCSDM;
    }

    public String getQKBJ() {
        return QKBJ;
    }

    public void setQKBJ(String QKBJ) {
        this.QKBJ = QKBJ;
    }

    public ExamBaseParam getExamBaseParam() {
        return examBaseParam;
    }

    public void setExamBaseParam(ExamBaseParam examBaseParam) {
        this.examBaseParam = examBaseParam;
    }

    public Date getDateTime() {
        return dateTime;
    }

    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    public String getLJKCH() {
        return LJKCH;
    }

    public void setLJKCH(String LJKCH) {
        this.LJKCH = LJKCH;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }
}















